<?php
class MHDEV_View_Helper_GetCountMessages extends Zend_View_Helper_Abstract
{
	public function GetCountMessages($uid)
	{
		// db
		$messages	= new Messages();
		
		// query
		$query		= $messages->fetchAll('`is_read` = "0" AND `receiver_uid` =' . intval($uid));

		return $query->count();
	}
}